{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Lesson 4\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#  Traditional Methods for Portfolio Construction"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![](Lesson4GoalHeaderImage.png)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.1 Introduction"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "An investor essentially has to do a lot of study and research before the assets comprising the portfolio are selected. **Lesson 3 Heuristic Portfolio Selection** detailed on how $k$-means clustering could be employed to undertake a heuristic selection of assets that ensures diversification. Termed **$k$-portfolios**, these portfolios ensured diversification by virtue of the choices made, one each from each cluster generated by the clustering method, which are inherently dissimilar in behaviour. Nevertheless, several questions need to be answered with regard to the behaviour of $k$-portfolios. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The first and foremost question is *what is the diversification index of a $k$-portfolio*? In other words, having decided to invest in a $k$-portfolio, how would an investor know how diversified is the portfolio?   \n",
    "  \n",
    "In this regard,  one among several diversification indices available in the finance literature, viz., **Diversification Ratio** was introduced in Lesson 3. However, to compute the diversification index,  the investor should have decided on the apportionment of capital over each of the assets in the portfolio. In other words, the asset allocation **weights** (introduced in **Lesson 1 Fundamentals of Risk and Return of a Portfolio**) must have been determined. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Needless to say, determining the asset allocation weights is an equally, if not more, complex task especially when investors are strongly inclined to follow some popular investment strategies or express preference for certain assets or asset classes in the portfolio or are bound by company norms or religious laws etc. We shall defer discussion on these complex asset allocation models and for now, focus on traditional and time tested methods of determining asset allocation weights. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Two traditional methods of asset allocation, which are considered as benchmark portfolio construction strategies are introduced in this lesson. They are,  \n",
    "\n",
    "(1) **Equal weighted portfolio construction**, and   \n",
    "(2) **Inverse volatility weighted portfolio construction**.  \n",
    "\n",
    "The two techniques shall be applied over $k$-portfolios to determine their Diversification Ratios and study their behaviour. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.2 Equal Weighted Portfolio Construction"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "An **equal weighted portfolio construction** treats all stocks in the portfolio as equal and allots equal weights. Thus the weight vector of a portfolio comprising $N$ stocks is given by   \n",
    " "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![](Lesson4Eqn4_1.png)\n",
    "<h5 align=\"right\">..........(4.1)</h5>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The following Python code applies equal weighted portfolio construction method for the DJIA $k$-portfolio (**$k$-portfolio 1**) discussed in Sec. 3.5 of **Lesson 3 Heuristic Portfolio Selection**.  The $k$-portfolio comprises the following stocks:  \n",
    "\n",
    "𝑘-portfolio 1:\n",
    "\n",
    "{Coca-Cola (KO), United Health (UNH), Walt Disney (DIS), IBM (IBM), Cisco (CSCO), JPMorgan Chase (JPM), Goldman Sachs (GS), Walgreens Boots Alliance (WBA), Apple (AAPL), Home Depot (HD), American Express (AXP), McDonald's (MCD), Merck (MRK), Boeing (BA), Caterpillar (CAT)}   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "k-portfolio 1 asset labels:\n",
      " ['AAPL', 'AXP', 'BA', 'CAT', 'CSCO', 'DIS', 'GS', 'HD', 'IBM', 'JPM', 'KO', 'MCD', 'MRK', 'UNH', 'WBA']\n",
      "k-portfolio 1 dataset size:\n",
      " 1258 15\n",
      "k-portfolio 1 stock prices:\n",
      " [[ 74.52571  85.5     123.25    ...  55.57     79.18     65.67   ]\n",
      " [ 73.99429  86.04    124.27    ...  56.05     79.51     66.01   ]\n",
      " [ 74.14429  87.4     126.04    ...  56.26     78.19     66.16   ]\n",
      " ...\n",
      " [199.5     109.85    369.04001 ...  80.8     248.78999  54.5    ]\n",
      " [200.61999 110.16    364.94    ...  80.82    246.03     54.51   ]\n",
      " [198.95    109.85    370.16    ...  79.84    235.42     53.44   ]]\n"
     ]
    }
   ],
   "source": [
    "#read k portfolio 1 dataset comprising 15 stocks\n",
    "\n",
    "#dependencies\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "#input stock dataset\n",
    "StockFileName = 'DJIA_Apr112014_Apr112019_kpf1.csv'\n",
    "Rows = 1259  #excluding header\n",
    "Columns = 15  #excluding date\n",
    "\n",
    "#read stock prices \n",
    "df = pd.read_csv(StockFileName,  nrows= Rows)\n",
    "\n",
    "#extract asset labels\n",
    "assetLabels = df.columns[1:Columns+1].tolist()\n",
    "print('k-portfolio 1 asset labels:\\n', assetLabels)\n",
    "\n",
    "#extract stock prices excluding header and trading dates\n",
    "dfStockPrices = df.iloc[1:, 1:]\n",
    "\n",
    "#store stock prices as an array\n",
    "arStockPrices = np.asarray(dfStockPrices)\n",
    "[rows, cols]= arStockPrices.shape\n",
    "print('k-portfolio 1 dataset size:\\n', rows, cols)\n",
    "print('k-portfolio 1 stock prices:\\n', arStockPrices)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The $k$-portfolio returns are computed as discussed in **Lesson 1 Fundamentals of risk and return of a portfolio**. The Python function to compute daily returns and the code fragment that runs it over DJIA $k$-portfolio 1 are shown below."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "#function to compute stock returns\n",
    "def StockReturnsComputing(StockPrice, Rows, Columns):\n",
    "    \n",
    "    import numpy as np\n",
    "    \n",
    "    StockReturn = np.zeros([Rows-1, Columns])\n",
    "    for j in range(Columns):  # j: Assets\n",
    "        for i in range(Rows-1):     #i: Daily Prices\n",
    "            StockReturn[i,j]=((StockPrice[i+1, j]-StockPrice[i,j])/StockPrice[i,j])\n",
    "\n",
    "    return StockReturn"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "k-portfolio 1 returns:\n",
      " [[-0.00713  0.00632  0.00828 ...  0.00864  0.00417  0.00518]\n",
      " [ 0.00203  0.01581  0.01424 ...  0.00375 -0.0166   0.00227]\n",
      " [ 0.01143 -0.0135   0.01492 ...  0.00373 -0.03082  0.00892]\n",
      " ...\n",
      " [-0.003   -0.00768 -0.01463 ... -0.00185  0.00016 -0.01017]\n",
      " [ 0.00561  0.00282 -0.01111 ...  0.00025 -0.01109  0.00018]\n",
      " [-0.00832 -0.00281  0.0143  ... -0.01213 -0.04312 -0.01963]]\n"
     ]
    }
   ],
   "source": [
    "#compute asset returns\n",
    "arReturns = StockReturnsComputing(arStockPrices, rows, cols)\n",
    "print('k-portfolio 1 returns:\\n', arReturns)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The mean returns and the variance-covariance matrix of returns are computed as demonstrated in the Python code shown below."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Mean returns of k-portfolio 1:\n",
      " [ 0.0009   0.00028  0.00099  0.00038  0.0008   0.00039  0.00032  0.00085\n",
      " -0.00017  0.00061  0.00019  0.00056  0.00036  0.00095 -0.00003]\n",
      "\n",
      "Variance-Covariance matrix of returns of k-portfolio 1: \n",
      "\n",
      "Size   (15, 15) \n",
      " [[0.00024 0.00007 0.0001  0.0001  0.0001  0.00007 0.0001  0.00007 0.00007\n",
      "  0.00008 0.00003 0.00005 0.00005 0.00008 0.00007]\n",
      " [0.00007 0.00016 0.00008 0.00009 0.00007 0.00006 0.00011 0.00007 0.00007\n",
      "  0.0001  0.00003 0.00003 0.00006 0.00007 0.00007]\n",
      " [0.0001  0.00008 0.00023 0.00013 0.00009 0.00007 0.00011 0.00007 0.00008\n",
      "  0.0001  0.00004 0.00005 0.00006 0.00007 0.00007]\n",
      " [0.0001  0.00009 0.00013 0.00027 0.0001  0.00007 0.00013 0.00008 0.00009\n",
      "  0.00012 0.00004 0.00005 0.00006 0.00007 0.00007]\n",
      " [0.0001  0.00007 0.00009 0.0001  0.00018 0.00007 0.00009 0.00007 0.00008\n",
      "  0.00009 0.00004 0.00005 0.00006 0.00007 0.00007]\n",
      " [0.00007 0.00006 0.00007 0.00007 0.00007 0.00014 0.00008 0.00006 0.00006\n",
      "  0.00007 0.00003 0.00004 0.00005 0.00006 0.00006]\n",
      " [0.0001  0.00011 0.00011 0.00013 0.00009 0.00008 0.00021 0.00008 0.00008\n",
      "  0.00016 0.00003 0.00005 0.00007 0.00008 0.00008]\n",
      " [0.00007 0.00007 0.00007 0.00008 0.00007 0.00006 0.00008 0.00014 0.00006\n",
      "  0.00008 0.00003 0.00005 0.00005 0.00007 0.00007]\n",
      " [0.00007 0.00007 0.00008 0.00009 0.00008 0.00006 0.00008 0.00006 0.00016\n",
      "  0.00008 0.00004 0.00004 0.00006 0.00006 0.00005]\n",
      " [0.00008 0.0001  0.0001  0.00012 0.00009 0.00007 0.00016 0.00008 0.00008\n",
      "  0.00017 0.00003 0.00005 0.00007 0.00008 0.00007]\n",
      " [0.00003 0.00003 0.00004 0.00004 0.00004 0.00003 0.00003 0.00003 0.00004\n",
      "  0.00003 0.00008 0.00004 0.00004 0.00003 0.00004]\n",
      " [0.00005 0.00003 0.00005 0.00005 0.00005 0.00004 0.00005 0.00005 0.00004\n",
      "  0.00005 0.00004 0.00011 0.00004 0.00004 0.00004]\n",
      " [0.00005 0.00006 0.00006 0.00006 0.00006 0.00005 0.00007 0.00005 0.00006\n",
      "  0.00007 0.00004 0.00004 0.00015 0.00006 0.00006]\n",
      " [0.00008 0.00007 0.00007 0.00007 0.00007 0.00006 0.00008 0.00007 0.00006\n",
      "  0.00008 0.00003 0.00004 0.00006 0.00017 0.00008]\n",
      " [0.00007 0.00007 0.00007 0.00007 0.00007 0.00006 0.00008 0.00007 0.00005\n",
      "  0.00007 0.00004 0.00004 0.00006 0.00008 0.00026]]\n"
     ]
    }
   ],
   "source": [
    "#compute mean returns and variance covariance matrix of returns\n",
    "\n",
    "#set precision for printing results\n",
    "np.set_printoptions(precision=5, suppress = True)\n",
    "\n",
    "meanReturns = np.mean(arReturns, axis = 0)\n",
    "print('Mean returns of k-portfolio 1:\\n', meanReturns)\n",
    "covReturns = np.cov(arReturns, rowvar=False)\n",
    "print('\\nVariance-Covariance matrix of returns of k-portfolio 1: \\n')\n",
    "print('Size  ', covReturns.shape, '\\n', covReturns)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Applying equal weighted portfolio construction method to $k$-portfolio 1 and obtaining the annualized risk (%) and the expected annual return (%) of the portfolio (as discussed in **Lesson 1 Fundamentals of risk and return of a portfolio**) yields the following."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Annualized Portfolio Risk :  13.68 %\n",
      "\n",
      "Annualized Expected Portfolio Return:  12.34 %\n"
     ]
    }
   ],
   "source": [
    "#equal weighted portfolio construction: Annualized risk and \n",
    "#expected annualized portfolio return\n",
    "#trading days = 251\n",
    "PortfolioSize = Columns\n",
    "EqualWeightVector = np.ones((1,PortfolioSize))*(1.0/PortfolioSize)\n",
    "EqWgtPortfolioRisk = np.sqrt(np.matmul((np.matmul(EqualWeightVector,covReturns)), \\\n",
    "                     np.transpose(EqualWeightVector)))\n",
    "EqWgtAnnPortfolioRisk = EqWgtPortfolioRisk*np.sqrt(251)*100\n",
    "EqWgtPortfolioReturn = np.matmul(EqualWeightVector, np.transpose(meanReturns))\n",
    "EqWgtAnnPortfolioReturn = 251*EqWgtPortfolioReturn * 100\n",
    "\n",
    "print(\"Annualized Portfolio Risk :  %4.2f\" % EqWgtAnnPortfolioRisk, \"%\")\n",
    "print(\"\\nAnnualized Expected Portfolio Return:  %4.2f\" %  EqWgtAnnPortfolioReturn,\"%\")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Diversification Ratio of the Equal Weighted $k$-Portfolio"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Following equation (3.1) in **Lesson 3 Heuristic Portfolio Selection**, the Diversification Ratio of  $k$-portfolio 1 is computed as follows. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " Equal Weighted Portfolio:Diversification Ratio  1.53\n"
     ]
    }
   ],
   "source": [
    "# Equal weighted portfolio: Diversification Ratio\n",
    "EqWgtPortfolioAssetStdDev = np.sqrt(np.diagonal(covReturns))\n",
    "EqWgtPortfolioDivRatio = np.sum(np.multiply(EqWgtPortfolioAssetStdDev, EqualWeightVector)) \\\n",
    "                         / EqWgtPortfolioRisk\n",
    "print(\"\\n Equal Weighted Portfolio:Diversification Ratio  %4.2f\" % EqWgtPortfolioDivRatio)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.3 Inverse Volatility Weighted Portfolio"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "An **inverse volatility weighted portfolio**  is one in which highly volatile assets are allotted smaller weights and low volatile assets are allotted larger weights. Thus, the weights of the individual assets in the portfolio are proportional to the reciprocals of their individual volatilities.   \n",
    "The weights are given by,  \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![](Lesson4Eqn4_2.png)\n",
    "<h5 align=\"right\">..........(4.2)</h5>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The following Python code applies inverse volatility weighted portfolio construction method for the DJIA $k$-portfolio (**$k$-portfolio 1**) discussed in Sec. 4.2.   \n",
    "\n",
    "Since the diagonal of the variance-covariance matrix of returns **covReturns** denotes the variance of returns, the individual asset risk $\\sigma_i$ of asset $i$ in the $k$-portfolio, which is defined to be the standard deviation of asset returns, can be computed as square root of the variance. **InvVolWeightAssets_Risk** in the Python code shown below does just that.   \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The annualized risk (%) and the expected annual return (%) of the inverse volatility weighted $k$-portfolio have been shown in the output."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Annualized Portfolio Risk: 13.24 %\n",
      "\n",
      "Annualized Expected Portfolio Return: 12.13 %\n"
     ]
    }
   ],
   "source": [
    "#Inverse volatility weighted portfolio construction: Annualized risk and \n",
    "#Expected annualized portfolio return\n",
    "#Trading days = 251\n",
    "InvVolWeightAssets_Risk = np.sqrt(np.diagonal(covReturns))\n",
    "InvVolWeightAssets_ReciprocalRisk = 1.0/InvVolWeightAssets_Risk\n",
    "InvVolWeightAssets_ReciprocalRisk_Sum = np.sum(InvVolWeightAssets_ReciprocalRisk)\n",
    "InvVolWeightAssets_Weights = InvVolWeightAssets_ReciprocalRisk / \\\n",
    "                             InvVolWeightAssets_ReciprocalRisk_Sum\n",
    "InvVolWeightPortfolio_Risk = np.sqrt(np.matmul((np.matmul(InvVolWeightAssets_Weights,\\\n",
    "                             covReturns)), np.transpose(InvVolWeightAssets_Weights)))\n",
    "\n",
    "#annualized risk and return\n",
    "InvVolWeightPortfolio_AnnRisk = np.sqrt(251)* InvVolWeightPortfolio_Risk *100\n",
    "InvVolWeightPortfolio_AnnReturn = 251* np.matmul(InvVolWeightAssets_Weights,\\\n",
    "                                  np.transpose(meanReturns)) *100\n",
    "\n",
    "print(\"Annualized Portfolio Risk: %4.2f\" % InvVolWeightPortfolio_AnnRisk,\"%\\n\")\n",
    "print(\"Annualized Expected Portfolio Return: %4.2f\" % InvVolWeightPortfolio_AnnReturn,\"%\")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The Diversification Ratio of the Inverse Volatility Weighted Portfolio is shown in the output. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      " Inverse Volatility  Weighted Portfolio:Diversification Ratio 1.54\n"
     ]
    }
   ],
   "source": [
    "# Inverse volatility weighted portfolio: Diversification Ratio\n",
    "InvVolWeightAssets_Risk= np.sqrt(np.diagonal(covReturns))\n",
    "InvVolWeightPortfolioDivRatio = \\\n",
    "np.sum(np.multiply(InvVolWeightAssets_Risk, InvVolWeightAssets_Weights))\\\n",
    "/ InvVolWeightPortfolio_Risk\n",
    "print(\"\\n Inverse Volatility  Weighted Portfolio:Diversification Ratio %4.2f\" \\\n",
    "      % InvVolWeightPortfolioDivRatio)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.4  \"Ideal\" Equal Weighted and Inverse Volatility Weighted Portfolios"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The  investor chose to invest in a $k$-portfolio of 15 stocks selected out of the \"mini-universe\" of 29 DJIA stocks. The equal weighted portfolio construction yielded a Diversification Ratio of 1.53 and the inverse volatility weighted portfolio construction yielded a Diversification Ratio of 1.54. The annualized risk and expected portfolio return of the equal weighted and inverse volatility weighted portfolios were (13.68%, 12.34%) and (13.24%, 12.13%) respectively.  \n",
    "Now, was investing on the $k$-portfolio worth the effort? What if the investor had chosen to invest in the whole \"mini-universe\", which needless to say is an \"ideal\" portfolio? Would the behaviour of the \"ideal\" portfolio surpass that of the contending portfolios?  \n",
    "\n",
    "Repeating the portfolio construction methods over the \"mini-universe\" and running the Python code all over again with the CSV file whose details have been provided in the Python code shown below, yields an output,  snapshots of which are shown in the succeeding cells."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "#identify the \"mini\" stock universe dataset\n",
    "StockFileName = 'DJIA_Apr112014_Apr112019.csv'\n",
    "Rows = 1259  #excluding header\n",
    "Columns = 29  #excluding date"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The \"ideal\" equal weighted porfolio yields the following results:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**\"Ideal\" Equal Weighted Portfolio**  \n",
    "\n",
    "Annualized portfolio risk:             12.84%   \n",
    "Expected Annualized portfolio return:  11.75%  \n",
    "Diversification Ratio:                  1.57"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The \"ideal\" inverse volatility weighted portfolio yields the following results:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**\"Ideal\" Inverse Volatility  Weighted Portfolio** \n",
    "\n",
    "Annualized portfolio risk:            12.47%  \n",
    "Expected Annualized portfolio return: 11.29%  \n",
    "Diversification Ratio:                 1.57\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A comparison of the \"ideal\" portfolio behaviour with that of the $k$-portfolio's behaviour yields the following observations:    \n",
    "\n",
    "(1)  Even if an investor had enough capital to invest in all the stocks in the \"mini-universe\", despite employing time-tested portfolio construction methods such as equal weighted or inverse volatility weighted construction, the behaviour of the \"ideal\" portfolio does not surpass that of its contenders and hence is not a remarkable choice to opt for.  \n",
    "\n",
    "(2)  The Diversification Ratios of both equal weighted and inverse volatility weighted $k$-portfolios are in  proximity to that of the \"ideal\" portfolio, conveying a significant message that prudent selection of stocks ($k$-means clustering in this case) can ensure a diversification index as much as that of an \"ideal\"  portfolio  that invests in the complete universe of stocks.  \n",
    "\n",
    "(3)  Diversification does not mean investing in a large number of stocks, but making a prudent choice of stocks, smaller in number yet diverse from one another in behaviour. A $k$-portfolio guarantees diversification in this sense.   \n",
    "\n",
    "(4)  A portfolio that holds a large number of stocks, for the sake of diversification,  can give rise to huge transaction costs and management fees. $k$-portfolios in this regard are economical with regard to these costs.  \n",
    "\n",
    "(5) $k$-portfolios by and large assure **risk-parity investing**, where higher returns are ensured for an equal amount of risk and diversification ratio, as that of an \"ideal\" portfolio.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Companion Reading  \n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "This blog  is an abridged adaptation of concepts discussed in Chapter 3 of [PAI 18] to Dow Jones dataset (DJIA index: April, 2014- April, 2019) and implemented in Python. Readers (read \"worker bees\"),  seeking more information may refer to the corresponding chapter in the  book.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<h3 align=\"left\">References</h3>\n",
    "\n",
    "[PAI 18]   Vijayalakshmi Pai G. A., Metaheuristics for Portfolio Optimization- *An \n",
    "           Introduction using MATLAB*, Wiley-ISTE, 2018. https://www.mathworks.com/academia/books/metaheuristics-for-portfolio-optimization-pai.html "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Next.....Lesson 5: Mean-Variance Optimization of Portfolios"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![](Lesson4ExitTailImage.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
